Skip to content

Declare aiohttp as a dependency - #34

Merged
angelnu merged 1 commit into
angelnu:mainfrom
TheeCoderAhmed:fix/declare-aiohttp
Nov 22, 2026
Merged

angelnu merged 1 commit into
angelnu:mainfrom
TheeCoderAhmed:fix/declare-aiohttp

Conversation

@TheeCoderAhmed

Copy link
Copy Markdown
Contributor

ttn_client/__init__.py imports client.py, which imports aiohttp (src/ttn_client/client.py:13), but the [project] table in pyproject.toml has no dependencies, so the package metadata declares none (1.3.0 on PyPI included). aiohttp is only pinned in requirements.txt for development. In a clean environment:

pip install ttn_client
python -c "import ttn_client"
ModuleNotFoundError: No module named 'aiohttp'

This adds dependencies = ["aiohttp"]. I left it unpinned, since the exact ==3.14.3 pin in requirements.txt would clash with Home Assistant's own aiohttp version if it were in the install metadata.

How I checked it: installed main and this branch into fresh venvs with pip install <checkout> and ran python -I -c "import ttn_client". main fails with the error above; with this change the import works.

ttn_client.client imports aiohttp, but pyproject.toml declared no dependencies, so installing the package did not pull it in and importing ttn_client failed.
@angelnu
angelnu merged commit ec402be into angelnu:main Nov 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants